import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Layout from '@/layout'

Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    component: () => import(/* webpackChunkName: "about" */ '../views/Login.vue')
  },
  {
    path: '/404',
    name: 'notfound',
    component: () => import(/* webpackChunkName: "about" */ '../views/error/404.vue')
  },
  {
    path: '/',
    name: 'Home',
    redirect: '/home',
    component: Layout,
    children: [{path: '/home', component: Home}]
  }
]

const router = new VueRouter({
  routes
})

export default router
